package program.Command;

import program.SExpression;
import Exceptions.ShootException;
import Exceptions.TerminationError;
import roborally.Robot;
/**
 * A class representing a SHOOT command.
 * 
 * @author Jef Keijers/Bachelor of Science: Informatics
 * @version 1.0
 */

public class Shoot extends Command {

	/**
	 * This method let the robot shoot one time and afterwards return null.
	 */
	@Override
	public Command execute(Robot robot) throws ShootException, TerminationError {
		robot.shoot();
		return null;
	}

	/**
	 * This method returns the SExpression representation of shoot.
	 */
	@Override
	public SExpression toSExpression() {
		return this.makeSingletonSExpressionList("shoot");
	}
}
